<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="pa" uri="http://agil.com"%>
<%@ page isELIgnored="false"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@page import="com.agil.photoalbum.db.dao.Functions"%>
<%@page import="java.util.Set"%>
<%@page import="com.agil.photoalbum.db.entities.Picture"%>
<%@page import="java.util.List"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<%
	String imagePath = request.getParameter("imagePath");
	String imageId = request.getParameter("imageId");
	request.setAttribute("imageId", imageId);
	request.setAttribute("imagePath", imagePath);
%>
<img src="${imagePath}" alt="" />
<%
	Picture picture = Functions.getPicture(request
			.getParameter("imageId"));
	List comments = Functions.getCommentsForPicture(imageId);
	request.setAttribute("comments", comments);
%>
<br />
<c:if test="${empty comments}">
	<c:out value="No comments published for this picture."></c:out>
</c:if>
<c:if test="${not empty comments}">
COMMENTS:<br />
	<br />
	<c:forEach var="comment" items="${comments}">
		<c:out value="${comment.commentMsg}"></c:out>
	</c:forEach>
</c:if>
<form action="pages/sendMailForm.jsp" method="post">
	<
</form>
</body>
</html>